# DayDayUpQ1.py
# 每天进步1% 退步1%
dayup=pow(1.001,365)
daydown=pow(0.999,365)
print("向上1‰：{:.2f},向下：{:.2f}".format(dayup,daydown))

# 每天进步5% 退步5%
dayfactor=0.005
dayup=pow(1+dayfactor,365)
daydown=pow(1-dayfactor,365)
print("向上5‰：{:.2f},向下：{:.2f}".format(dayup,daydown))

# 每天进步1% 退步1%
dayup=pow(1.01,365)
daydown=pow(0.99,365)
print("向上1%：{:.2f},向下：{:.2f}".format(dayup,daydown))

# 3每天工作进步1% 工作退步1%
dayup=1.0
dayfactor=0.01
for i in range(365):
    if i % 7 in [6,0]:
        dayup=dayup*(1-dayfactor)
    else:
        dayup=dayup*(1+dayfactor)
print("工作日 1‰ 提升一年：{:.2f}".format(dayup))

# 4 每天加一点
def dayUP(df):
    dayup=1
    for i in range(365):
        if i % 7 in [6,0]:
            dayup=dayup*(1-0.01)
        else:
            dayup=dayup*(1+df)
    return dayup
dayfactor=0.01
while dayUP(dayfactor)<37.78:
    dayfactor+=0.001
print("工作日 1‰ 提升加一点一年：{:.3f}".format(dayfactor))
    
# 每天进步5% 退步5%
dayfactor1=0.019
dayfactor2=0.01
dayup=pow(1+dayfactor2,365)
dayup2=pow(1+dayfactor1,365)
print("向上1%：{:.2f},向上1.9%：{:.2f}".format(dayup,dayup2))


# 每天进步5% 退步5%
dayfactor1=0.01
dayfactor2=0.005
dayup=pow(1+dayfactor2,365)
dayup2=pow(1-dayfactor1,365)
print("向上1%：{:.2f},向下0.005%：{:.2f}".format(dayup,dayup2))

# 每天退步5‰，一年几乎退完